<template>
  <div class="tag-system">
    <span class="tag" v-for="item in tagSystemList">{{item.zhName}}</span>
  </div>
</template>

<script>
  export default {
    data() {
      return {
        tagSystemList: []
      }
    },
    methods: {
      async getTagSystemList() {
        let params = {
          // search_value: this.search_value,
          // flag: this.result_flag,
          // bp_name: this.searchTag.tagTitle
          search_value: '京东',
          flag: 'account',
          bp_name: '京东'
        }
        let res = await this.axios.post('/search/getProfile.do', params)
        if (res.status === 200) {
          var resData = res.data.data.rows[0].filter(item => item.zhName !== '')
          console.log(resData)
          this.tagSystemList = resData
          // console.log(resData.rows[0])
          // var item = []
          // let filterRows = resData.rows[0].filter(item => item.zhName !== '')
          // // console.log(filterRows)
          // // let filterRowsArr = filterRows.map(item => item.name)
          // let filterRowsArrZh = filterRows.map(item => item.zhName)
          // let filterRowsArrEn = filterRows.map(item => item.enName)
          // let filterRowsZh = filterRows.map(item => item.zhTips)
          // let filterRowsEn = filterRows.map(item => item.enTips)
          // console.log('哈哈')
          // console.log(filterRowsZh)
          // _this.searchTag.tagShowZh = filterRowsArrZh
          // _this.searchTag.tagShowEn = filterRowsArrEn
          // _this.searchTag.tagTipsZh = filterRowsZh
          // _this.searchTag.tagTipsEn = filterRowsEn
          // // console.log('哈哈')
          // // console.log(_this.searchTag.tagTipsZh)
          // // 初始化汉化tags
          // if (_this.language === 'en') {
          //   // _this.datadata = 'haha'
          //   // console.log('英语')
          //   _this.searchTag.tagTips = _this.searchTag.tagTipsEn
           //   _this.searchTag.tagShow = _this.searchTag.tagShowEn
          // } else if (_this.language === 'zh') {
          //   // _this.datadata = '哈哈'
          //   // console.log('中文')
          //   _this.searchTag.tagTips = _this.searchTag.tagTipsZh
          //   _this.searchTag.tagShow = _this.searchTag.tagShowZh
          // }
        }
      }
    },
    mounted() {
      this.getTagSystemList()
    }
  }
</script>

<style scoped lang="scss">
  .tag {
    display: inline-block;
    height: 30px;
    min-width: 80px;
    line-height: 30px;
    font-size: 12px;
    color: #333;
    text-align: center;
    background: #c1e7fe;
    border: 1px solid #0090e9;
    border-radius: 4px;
    padding: 0 10px;
    margin-left: 10px;
    margin-top: 10px;
  }
</style>
